package cn.shadow.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
@Data
@ConfigurationProperties("cn.shadow.netty.server")
public class ServerConfig {
    private int port = 8080;

    @Bean
    public int getPort() {
        return port;
    }
}
